<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>Document</title>
<link rel="stylesheet" href="../assets/agile/css/ratchet/css/ratchet.min.css">
<link rel="stylesheet" href="../assets/agile/css/flat/flat.component.css">
<link rel="stylesheet" href="../assets/agile/css/flat/iconline.css">
<link rel="stylesheet" href="../assets/app/css/app.css" />
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/local.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<style>body{background:#f5f5f5;}ul.listitem{background:#fff;}.listitem li{margin:5px auto 0px auto;}p.qm{overflow: hidden;white-space: nowrap;text-overflow:ellipsis;}</style>
</head>
<body>
<!--通用顶部-->
<div id="ios-top-box">
    <div id="header" class="bar bar-nav">
    <div class="titlebar">
    <a href="javascript:appClose('fansrecords',api);"><i class="iconfont iconline-arrow-left"></i></a>
    <h1 class="title">历史清单</h1>
    </div>
    </div>
</div>
<!--通用顶部结束-->
<header class="bar bar-nav box_shadow head_a" style="margin-top:43px;">
	<a href="javascript:fansrecord();" style="width:50%">本月清单</a>
	<a href="javascript:;" class="selected_bottom" style="width:50%">历史清单</a>
</header>
<section style="margin-top:95px !important;">
<div class="scroller create_goods">
<p style="text-align:center;padding:10px 0;display:none;">暂无数据</p>
</div>
</section>
</body>
<script type="text/javascript">
function fansrecord(){
	if(!getUserinfo()){
		$.PageDialog.fail('请登录用户');
		return;
	}
	api.openWin({name:'fansrecord','url':'./fansrecord.html',reload:true});
}
apiready = function(){
	if(getUserinfo()){
		api.showProgress({title:'加载中',text:''});
		var userinfo = getUserinfo();
		GetJPData(config.url+'/app.php?act=fansrecords&uid='+userinfo.uid,{},function(data){
			api.hideProgress();
			if(data['status'] == 1){
				if(data['data'].length > 0){
					var html = '';
					for(var i in data['data']){
					    html += '<ul class="listitem group_listitem"><li>';
					    html += '<img uid="'+data['data'][i]['uid']+'" data-original="'+config.upload_url+'/'+data['data'][i]['uimg']+'" width="70" height="70" class="img lazy"/>';
					    html += '<div class="text">';
					    html += '<p class="qm">'+data['data'][i]['content']+'</p>';
					    html += '<p><span style="color:#0577ab;">'+data['data'][i]['uname']+'</span><span style="float:right;">参与了'+data['data'][i]['ygmoney']+'次</span></p>';
					    html += '<p>获得佣金：'+data['data'][i]['money']+'<span style="float: right;">返佣率：'+data['data'][i]['bl']+'</span></p>';
					    html += '<p>下单时间：'+data['data'][i]['time']+'</p>';
					    html += '</div></li></ul>';
					}
					$('.scroller').html(html);
					lyzimg();
					
					$('img').bind('click',function(){
						var userid = $(this).attr('uid');
						localData.set('userid',userid);
						randomSwitchBtn('userindex',api);
					});
					
				}else{
					$('.scroller p').show();
				}
			}else{
				$('.scroller p').show();
				api.alert({msg:data['msg']});
			}
		});
	}else{
		$.PageDialog.fail('请登录用户');
	}
}
</script>
</html>